Fine-tune delays in Tooltip
and associated components
#2368
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
After we fixed the default
Tooltip
delay in #2263, a couple of components had the problem of lingering tooltips. To fix it, this PR wraps some of the parts of the affected components within Floating UI'sFloatingDelayGroup
.Components where
FloatingDelayGroup
wrapper is added:SideNavigation
Slider
Stepper
While this PR fixes the lingering tooltip problem within the items of the component itself, it doesn't fix the problem between two components. To fix the latter part also, I had considered moving
FloatingDelayGroup
to theThemeProvider
but then didn't go that route based on our internal discussion. One of the reasons to not go that route was to prevent unintended issues.According to our discussion, I also changed the default tooltip delay from
{ open: 50, close: 250 }
to{ open: 100, close: 200 }
. If we later find research regarding the best delay values, we can further fine-tune this default delay.Testing
CI passing after small updates to the tests.
Before and After
Before.mov
After.mov
Before.mov
After.mov
Before.mov
After.mov
Docs
Added a changeset.